<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="th/m/include/head :: head(~{::title}, ~{::style})">
    <meta charset="utf-8">
    <title>嵌套表</title>
    <style>
        .mui-input-row .input-icon {
            width: 50%;
            float: left;
        }

        .mui-input-row a {
            margin-right: 10px;
            float: right;
            text-align: left;
            line-height: 1.5;
        }

        .div_opinion {
            text-align: left;
        }

        .opinionContent {
            margin: 10px;
            width: 65%;
            float: right;
            font-weight: normal;
        }

        .opinionContent div {
            text-align: right;
        }

        .opinionContent div span {
            padding: 10px;
        }

        .opinionContent .content_h5 {
            color: #000;
            font-size: 17px;
        }
    </style>
</head>
<body>
<header class="mui-bar mui-bar-nav">
    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
    <h1 class="mui-title">
        明细表
    </h1>
</header>
<div class="mui-content">
    <div class="mui-scroll">
        <form class="mui-input-group" id="nest_form"
              enctype="multipart/form-data">
        </form>
    </div>
</div>
<script type="text/javascript" th:src="@{/weixin/js/macro/macro.js}"></script>
<script src="../../weixin/js/macro/open_window_macro.js"></script>
<script src="../../weixin/js/mui.nest_sheet.js"></script>
<script type="text/javascript" th:src="@{/weixin/js/utils.js}"></script>
<script th:src="@{'/weixin/flow/form_js/' + ${dFormCode} + '.jsp?flowId=' + ${flowId} + '&pageType=' + ${pageType} + '&actionId=' + ${actionId} + '&skey=' + ${nav.skey}}"></script>
<script th:inline="javascript">
    var pageType = [[${pageType}]];
    // 用于在nest_sheet_add_edit.jsp中当post时提取页面的类型，如为add表示在智能模块中添加，edit表示在流程或智能模块编辑页面中添加
    function getParentPageType() {
        // return "edit";
        return pageType;
    }

    mui('.mui-scroll-wrapper').scroll({
        deceleration: 0.0005 //flick 减速系数，系数越大，滚动速度越慢，滚动距离越小，默认值0.0006
    });
    var params = {
        "isWx": [[${isWx}]],
        "formCode": [[${dFormCode}]],
        "flowId": [[${flowId}]],
        "nestFieldName": [[${fieldCode}]],
        "actionId": [[${actionId}]],
        "parentCode": [[${parentCode}]],
        "skey": [[${nav.skey}]],
        "parentId": [[${parentId}]],
        "id":[[${id}]],
        "pageType": [[${pageType}]],
        "urlParams": '[(${urlParams})]'
    };

    var content = document.querySelector('.mui-content');
    window.nest_sheet = new mui.NestSheet(content, params);
    window.nest_sheet.initField();

    mui(".mui-bar").on("tap", ".mui-action-back", function () {
        if (params.isWx == 1) {
            nestSheetJump("列表", "../macro/nestSheetSelect" + params.urlParams + "&isWx=1", "");
        } else {
            mui.back();
        }
    });
</script>
</body>
</html>